package com.haipumi.biz.impl;

import java.util.List;

import com.haipumi.beans.haipumi_task;
import com.haipumi.biz.IBackTaskBiz;
import com.haipumi.dao.IBackTaskDao;
import com.haipumi.dao.impl.BackTaskDaoImpl;

public class BackTaskBizImpl implements IBackTaskBiz {

	
	IBackTaskDao ibtd=new BackTaskDaoImpl();
	
	@Override
	public List<haipumi_task> findAllTask() {
		List<haipumi_task> tasklist=null;
		tasklist=ibtd.findAllTask();
		return tasklist;
	}

	@Override
	public int countAllTask() {
		int r=0;
		r=ibtd.countAllTask();
		return r;
	}

	@Override
	public haipumi_task checkTask(String uid) {
		haipumi_task task=null;
		task=ibtd.checkTask(uid);
		return task;
	}

	@Override
	public boolean caozuo(String tid, String type) {
		boolean flag=false;
		if("frazetask".equals(type)){
			flag=ibtd.frazetask(tid);
		}else if("timeout".equals(type)){
			flag=ibtd.timeouttask(tid);
		}
		return flag;
	}

	@Override
	public boolean finishTask(String tid) {
		return ibtd.finishTask(tid);
	}


}
